package me.zhengjie.modules.quartz.task;

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.quartz.task.snmp.TrapMsgSender;
import me.zhengjie.utils.SpringContextHolder;
import org.springframework.stereotype.Service;

/**
 * 模拟发送trap·
 *
 */
@Slf4j
@Service
public class SnmpTrapTask {

    public void send(String sendType) {

        TrapMsgSender trapMsgSender = SpringContextHolder.getBean(sendType);

        trapMsgSender.sendTrapMsg();

        log.info("send 执行成功");
    }

}
